package com.ny.util;

import com.ny.util.page.Page;
import com.ny.util.page.Sort;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class TableFilterCollection<T> implements Serializable {


    /** 系统通过工具类将查询数据右侧加上% */
    public static final String TYPE_STRING_LIKE = "string-like";

    /** 系统通过工具类将查询数据左侧加上% */
    public static final String TYPE_STRING_LEFT_LIKE = "string-like-left";

    public static final String TYPE_STRING = "string";

    public static final String TYPE_INT = "int";

    public static final String TYPE_LONG = "long";

    public static final String TYPE_DATE = "date";

    public static final String TYPE_TIME = "time";

    public static final String TYPE_DATE_TIME = "datetime";


    public TableFilterCollection() {
        // no.
    }

    /**
     *
     */
    private static final long serialVersionUID = -7549261731724723015L;

    /**
     * 分页
     */
    private Page page = new Page();

    /**
     * 排序
     */
    private Sort[] sorts;

    /**
     * 查询参数
     */
    private transient T params;

    /**
     * 查询参数的元数据,仅仅中特别需要通过工具类做处理
     */
    private Map<String, String> metadataMap = new HashMap<>();

    public Page getPage() {
        return page;
    }

    public void setPage(Page page) {
        this.page = page;
    }

    public Sort[] getSorts() {
        return sorts;
    }

    public void setSorts(Sort[] sorts) {
        this.sorts = sorts;
    }

    public T getParams() {
        return params;
    }

    public void setParams(T params) {
        this.params = params;
    }

    public Map<String, String> getMetadataMap() {
        return metadataMap;
    }

    public void setMetadataMap(Map<String, String> metadataMap) {
        this.metadataMap = metadataMap;
    }

}
